/********************************************************/
/*	Copyright (C) 2012 Gong Li Bin			*/
/*	Project:	MrCloud(MapReduce)		*/
/*	Author:		gong_libin			*/
/*	Date:		2013_07_11			*/
/*	File:		MrMonitor.h			*/
/********************************************************/

#ifndef	_MRMONITOR_H
#define	_MRMONITOR_H

#include "MrLog.h"
#include "MrSet.h"
#include "MrUtl.h"
#include "MrConf.h"
#include "MrPipe.h"

#include <signal.h>
#include <getopt.h>
#include <sys/wait.h>

#define	MR_MN_PROC			128
#define	MR_MN_VERSION			"MrMonitor-2.0.0"

typedef struct tagMrMnConf
{
	CMrSet m_CProc;
	char m_szTim[MR_VALUE];
	char m_szCmd[MR_VALUE];
	char m_szLog[MR_VALUE];
}MRMNCONF_S;

void MrMnHelp(char* pszProc);
void MrMnProc(CMrSet& CProc);
void MrMnRun(MRMNCONF_S* pstConf);
void MrMnLog(char* pszFile, char* pszLog);
int MrMnInit(char* pszConf, MRMNCONF_S* pstConf);

#endif /* _MRMONITOR_H */
